<extend name="base/Base" />
<block name="Style">
<!-- FooTable Plugin CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/vendor/plugins/footable/css/footable.core.min.css">
		<!-- Admin Forms CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/assets/admin-tools/admin-forms/css/admin-forms.css">
		
</block>
<block name="Topbar">
 <header id="topbar" class="ph10">
       <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
            
         
			 <li class="active" >
              <a  href="__APP__/Mall/OrderExpress/Manage.html"   >商品分练</a>
            </li>
			
			 <li  >
              <a  href="__APP__/Mall/OrderExpress/Goods.html"   >商品明细</a>
            </li>
			 
			 
			
           
          </ul>
        </div>
      <div class="topbar-right hidden-xs hidden-sm">
		 <a href="#"  onclick="selectAll()" class="btn btn-default btn-sm fw600 ml10">
            <span class="fa fa-star pr5"></span>全选</a>
			 <a href="#"   onclick="unSelect()"  class="btn btn-default btn-sm fw600 ml10">
            <span class="fa fa-star-o pr5"></span>不选</a>
			 <a href="#"    onclick="reverse()"class="btn btn-default btn-sm fw600 ml10">
            <span class="fa fa-star-half-o pr5"></span>反选</a>
			  
			
			
			  <a href="#" onclick="status(2)" class="btn btn-default btn-sm fw600 ml10">
				<span class="fa fa-fighter-jet pr5"></span>自有物流</a>
			 <a href="#" onclick="status(3)" class="btn btn-default btn-sm fw600 ml10">
				<span class="fa fa-globe pr5"></span>第三方物流</a>
						  
          
        </div>
      </header>
	 
      
</block>
<block name="Content">
	 <!-- begin: .tray-center -->
        <div class="row">

        <!-- Panel with: Data Filter -->
          <div class="col-md-12" id="spy2" >
            <div class="panel-heading">
              <span class="panel-title">
                <span class="fa fa-search"></span>商品分练</span>
               <div class="pull-right">
			 				
            <!--    <a  href="#" data-toggle="modal" data-target="#myModal" class="btn btn btn-primary">新增节点</a>						
								
							 -->	<!-- Modal -->
									<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
									  <div class="modal-dialog" role="document">
										<div class="modal-content">
										  <div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
											<h4 class="modal-title" id="myModalLabel">新增节点</h4>
										  </div>
										  <div class="modal-body">
										    <form class="form-horizontal" role="form">
					
				<div class="form-group">
                    <label for="inputStandard" class="col-lg-3 control-label" style="padding-top:0px;">节点标示</label>
                    <div class="col-lg-8"  style="padding-top:2px;">
                      <div class="">
                        <input type="text" name="name" id="name" class="form-control input-lg" placeholder="请输入节点标示">
                      </div>
                    </div>
                  </div>
				 
				  
                
				
                  <div class="form-group">
                    <label for="inputStandard" class="col-lg-3 control-label" style="padding-top:0px;">节点内容</label>
                    <div class="col-lg-8"  style="padding-top:2px;">
                      <div class="">
                        <input type="text" name="value" id="value" class="form-control input-lg" placeholder="请输入节点内容">
                      </div>
                    </div>
                  </div>
				  
				   <div class="form-group">
                    <label for="inputStandard" class="col-lg-3 control-label" style="padding-top:0px;">节点说明</label>
                    <div class="col-lg-8"  style="padding-top:2px;">
                      <div class="">
                        <input type="text" name="intro" id="intro" class="form-control input-lg" placeholder="请输入节点说明">
                      </div>
                    </div>
                  </div>
				 
				
				
				
                </form>
              			
						
										  </div>
										  <div class="modal-footer">
											<button type="button" class="btn btn-default" data-dismiss="modal">关闭页面</button>
											<a href="#" class="btn btn-primary" onclick="create()" >新增节点</a>
											
										  </div>
										</div>
									  </div>
									</div>
								<script>
						
							//新增节点
							function create(){  
							
								var name = $("#name").val();
								var intro = $("#intro").val();
								var value = $("#value").val();
								
								$.ajax({
									type:'POST',
									url:"__APP__/Mall/MyExpressNode/Create.html",
									data:{
										
										
										"name": name,
										"intro": intro,
										"value": value,
										
									},
									success:function(data){			
										var info = eval(data)
										if (info.errcode == 0) {
										
											layer.msg(info.errmsg);
											setTimeout(window.location.reload(),3000);
											
										}else{
											layer.msg(info.errmsg);
										}
									},
									error:function(){
										layer.msg('系统繁忙,请稍候重试！');
									}
								
								});	 
							}  
							
							function AJAXDelete(id){  
								if(confirm('是否确认删除')){
									$.ajax({
										type:'POST',
										url:"__APP__/AICMF/Menu/Value/Delete.html",
										data:{
											"id": id,
											
										},
										success:function(data){								
											if (data == 1) {
											alert('删除成功');
											window.location.reload();
											}else{
												alert(data);
											}
										},
										error:function(){
											alert('未知错误');
										}
									
									});	 
								}
							} 
							
							function AJAXOutage(id){  
								if(confirm('是否确认隐藏')){
									$.ajax({
										type:'POST',
										url:"__APP__/AICMF/Menu/Value/Outage.html",
										data:{
											"id": id,
											
										},
										success:function(data){								
											if (data == 1) {
											alert('隐藏成功');
											window.location.reload();
											}else{
												alert(data);
											}
										},
										error:function(){
											alert('未知错误');
										}
									
									});	 
								}
							} 
							
							function AJAXEnabled(id){  
								if(confirm('是否确认显示')){
									$.ajax({
										type:'POST',
										url:"__APP__/AICMF/Menu/Value/Enabled.html",
										data:{
											"id": id,
											
										},
										success:function(data){								
											if (data == 1) {
											alert('显示成功');
											window.location.reload();
											}else{
												alert(data);
											}
										},
										error:function(){
											alert('未知错误');
										}
									
									});	 
								}
							} 
							</script>
							
              </div> 
            </div>
            <div class="panel-menu">
              <input id="fooFilter" type="text" class="form-control" placeholder="请输入搜索的关键字">
            </div>
            <div class="panel-body pn">
              <table class="table footable" data-filter="#fooFilter"  data-page-navigation=".pagination" data-page-size="100">
               <thead>
												<tr class="bg-light"> 
					 
					 <th style="width:5%">批量</th>
					<th >下单时间</th>
                    
                     <th >订单号</th>
                     <th >用户</th>
					 <th >来源</th>
                     
                     <th>金额</th>
                     <th >支付</th>
                     <th >送货</th>
                     <th >操作</th>
                     
                     							
                      
                    </tr>
											</thead>
											<tbody>
												 <volist name="list" id="list">
                    <tr>
						<td class="text-center">
						
						<center>
						<label class="option block mn">
						  <input type="checkbox" id="batch" name="batch" value="{$list.id}">
						
						</label>
						</center>
						
													
														
														
													  </td>
					  <td class="">{$list.time|date="m-d H:i",###}</td>
						
						<td class="">{$list.order_id}</td>
						<td class="">
						<div class="row">
							  <div class="col-md-3" >
                        <img class="img-responsive mw35 ib" title="user" src="{$list.n_img}">
						</div>
						  <div class="col-md-9" >	{$list.nickname}<br>UID:{$list.uid}</div>
						</div>
					
                      </td>
					  <td class="">
						
						
						 <if condition="$list.partner_id eq 1"> 
						<span style="color:green"><b>直接下单</b></span>
						
						<else />
						<div class="row">
						<div class="col-md-3" >
                        <img class="img-responsive mw35 ib" title="user" src="{$list.partner_img}">
						</div>
						  <div class="col-md-9" >	{$list.partner_nickname}<br>UID:{$list.partner_id}</div>
						</div>
						
						</if>
						</td>
						<td class="">￥{$list.money}元</td>
						<td class="">
						 <if condition="$list.pay_type eq 1"> 
						<span style="color:green"><b>微信</b></span>
						<elseif condition="$list.pay_type eq 2"/>
						<span style="color:green"><b>储值</b></span>
						<elseif condition="$list.pay_type eq 4"/>
						<span style="color:red"><b>到付</b></span>
						<else />
						  
						</if>
						</td>
						<td class="">
						方式：<if condition="$list.express_type eq 0"> 
						<span style="color:blue"><b>未分配配送方式</b></span>
						<elseif condition="$list.express_type eq 1"/>
						<span style="color:green"><b>自提点自提</b></span>
						<elseif condition="$list.express_type eq 2"/>
						<span style="color:green"><b>自有物流配送</b></span>
						<elseif condition="$list.express_type eq 3"/>
						<span style="color:red"><b>第三方物流配送</b></span>
						<else />
						  
						</if>
						<br>
						联系：{$list.name} {$list.tel}<br>
						地址：{$list.address}<br>
						留言：{$list.remark}
						
						 
						
						</td>
						
						
					
                       <td>
					  
						
						
						
							<div class="btn-group text-right">
						
						
						<if condition="$list.status eq 7"> 
						<button type="button" class="btn btn-danger br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待退款
						
						<elseif condition="$list.status eq 3"/>
						<button type="button" class="btn btn-warning br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待确认
						
						<elseif condition="$list.status eq 4"/>
						<button type="button" class="btn btn-success br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待发货
						
						<elseif condition="$list.status eq 5"/>
						<button type="button" class="btn btn-primary br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已发货
						
					
						<elseif condition="$list.status eq 6"/>
						<button type="button" class="btn btn-info br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已完成
						
						
						
						<elseif condition="$list.status eq 8"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已退款
						
						<elseif condition="$list.status eq 1"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待支付
						
						<elseif condition="$list.status eq 9"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已关闭
						
						<else /> 
						
						</if>
                          

						   <span class="caret ml5"></span>
                          </button>
                          <ul class="dropdown-menu" role="menu">
							
							<li >
                              <a  href="__APP__/Mall/Goods/Edit/id/{$list.id}.html" target="_blank" >编辑</a>
                            </li>
                          
                            
								
								
						    <li class="divider"></li>
							 <li >
                              <a  href="__APP__/Mall/Goods/Detail/id/{$list.id}.html" target="_blank" >查看</a>
                            </li>
						
                         
                          
							
                           
                          </ul>
                        </div>
						
						</td>
                          
							
                           
                      
                    </tr>
                </volist>
											</tbody>
											 <tfoot class="footer-menu">
												<tr>
												  <td colspan="12">
													<nav class="text-right">
													  <ul class="pagination hide-if-no-paging"></ul>
													</nav>
												  </td>
												</tr>
											  </tfoot>

										</table>
            </div>
          </div>
		      
      </div>

		
</block>
<block name="Script">
	
  <!-- FooTable Plugin -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.all.min.js"></script>
   <!-- FooTable Addon -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.filter.min.js"></script>
  
 <script type="text/javascript">
 
	
		function unSelect(){
				
		  $("input[id='batch']").each(function(){
		   $(this).prop("checked",false);
		  });  
		  
	
		}
		
		function selectAll(){
				
		 $("input[id='batch']").each(function(){
		   $(this).prop("checked",true);
		  });  
		  
		}
		
		function reverse(){
				
		 $("input[id='batch']").each(function(){
			$(this).prop("checked",!this.checked);   
		  
			})
		}
		
		function status(status){
				
				
						 var id=$('input[id="batch"]:checked').map(function(){return this.value}).get().join();
						
						layer.confirm('你确定要这样做么？', {
						  btn: ['确定','取消'] //按钮
						}, function(){
						  
						  $.ajax({
								type:'POST',
								url:"__APP__/Mall/OrderExpress/Status.html",
								data:{
									
									"id": id,
									"status": status,
									
								},
								success:function(data){			
										var info = eval(data)
										if (info.errcode == 0) {
										
											layer.msg(info.errmsg);
											setTimeout(window.location.reload(),3000);
											
										}else{
											layer.msg(info.errmsg);
										}
								},
								error:function(){
									layer.msg('系统繁忙,请稍候重试！');
								}
							
							});	 
						  
						}, function(){
						  
						  
						});

					
				
				}
		  </script>
 <script type="text/javascript">
  jQuery(document).ready(function() {

 

    // Init FooTable Examples
    $('.footable').footable();


  });
  </script>
</block>